import router from '@/router'

export default {
    install(Vue) {
        // 强制刷新页面
        Object.defineProperty(Vue.prototype.$bui, 'forcedRefresh', {
            value: (query) => {
                if (query) {
                    if (typeof query === 'object') {
                        router.push({ query: query })
                    }else{
                        // eslint-disable-next-line
                        console.warn('传入的参数必须是对象!')
                    }
                }
                router.push({ path: 'blank' })
            }
        })
    }
}

